Author Topic: Blitzmax & Opengl  (Read 5060 times)

0 Members and 1 Guest are viewing this topic.

Offline Pot Noodle

  • Sponsor
  • Amiga 1200
  • *******
  • Posts: 271
  • Karma: 15
  • Computers have lots of memory but no imagination
    • View Profile
Blitzmax & Opengl
« on: August 19, 2011 »
Anyone any good with Blitzmax & Opengl?

Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1294
  • Karma: 466
    • View Profile
    • my stuff
Re: Blitzmax & Opengl
« Reply #1 on: August 19, 2011 »
Maybe someone who's good in just one of the two can help you, too...
Challenge Trophies Won:

Offline zawran

  • Sponsor
  • Pentium
  • *******
  • Posts: 909
  • Karma: 67
    • View Profile
Re: Blitzmax & Opengl
« Reply #2 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.

Offline Pot Noodle

  • Sponsor
  • Amiga 1200
  • *******
  • Posts: 271
  • Karma: 15
  • Computers have lots of memory but no imagination
    • View Profile
Re: Blitzmax & Opengl
« Reply #3 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

Offline zawran

  • Sponsor
  • Pentium
  • *******
  • Posts: 909
  • Karma: 67
    • View Profile
Re: Blitzmax & Opengl
« Reply #4 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.

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17412
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: Blitzmax & Opengl
« Reply #5 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.
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Pot Noodle

  • Sponsor
  • Amiga 1200
  • *******
  • Posts: 271
  • Karma: 15
  • Computers have lots of memory but no imagination
    • View Profile
Re: Blitzmax & Opengl
« Reply #6 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  :-[