Dark Bit Factory & Gravity

PROGRAMMING => General coding questions => Topic started by: Pot Noodle on August 19, 2011

Title: Blitzmax & Opengl
Post by: Pot Noodle on August 19, 2011
Anyone any good with Blitzmax & Opengl?
Title: Re: Blitzmax & Opengl
Post by: hellfire on August 19, 2011
Maybe someone who's good in just one of the two can help you, too...
Title: Re: Blitzmax & Opengl
Post by: zawran on August 19, 2011
OpenGL in BlitzMax is used the same way as in other languages from what I know. So perhaps if you explain what you need to get done, then anyone with openGL experience could probably provide code which could help out.
Title: Re: Blitzmax & Opengl
Post by: Pot Noodle on August 20, 2011
I have sorted out my opengl problem, but I have a strange problem with centre screen.
I have a logo that I want in the middle of my screen so what I have done is this
My screen is 800 x 600

X = Logo.Width / 2
Xpos = ((ScreenWidth / 2) - X)
The logo then ends up to far over to the left  :-[ and not in the middle.
This is Blitzmax and the logo is a texture that is drawn using quads.
Can anyone tel me why?
Thanks
Title: Re: Blitzmax & Opengl
Post by: zawran on August 20, 2011
So you are using openGL commands throughout and not any of the BlitzMax drawimage stuff? Also we might need to see how you setup the openGL context (screen) so that we can see if it might be there the issue lies. It can be difficult to troubleshoot without seeing any code. If you were using BlitzMax drawing commands then what you have done with "x" and "xpos" should place the logo in the center of the screen horizontally.
Title: Re: Blitzmax & Opengl
Post by: Shockwave on August 21, 2011
There is too much ambiguity to be able to answer the question afaic.
As Zawran says, it could be an issue in the screen setup code, it could be an issue with the texture not being centered on the quad, it could be a view matrix problem or maybe a lot of other things..

Maybe you would rather solve as much of the problem by yourself as you can pot noodle, but as usual you will have to post your code to get the best answer - it saves us time and it's more helpful to others who may run into the same issues as you have.

Thanks.
Title: Re: Blitzmax & Opengl
Post by: Pot Noodle on August 23, 2011
Sorry about that,  I did sort it out after a while it was due the cords being in floating point and not integers as my previous post shows, I will remember in the future  :-[