Author Topic: a little stuck with glsl  (Read 3086 times)

0 Members and 1 Guest are viewing this topic.

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1668
  • Karma: 133
    • View Profile
a little stuck with glsl
« on: June 24, 2013 »
hey guys here is a very early sort of opengl engine ive been tinkering with and building for the past few weeks.

it was actually an old state engine i made for a game years ago. but i stripped it all back and started building it up geared towards demo states and glsl.. anywho it was all going nicely until i filled state 2 with a tangent example i found on the net,

for some reason no matter what i try i cannot get the cube too render im sure my vbo's are not getting through but cant see why not?! i know my shader loading and texture mapping is fine because the first state is a specular example and that works fine.. so a bit stumped atm.

you will see when you run it. it starts in state 1, then moves on too state 2 with a white background well there should be a great big bump mapped cube there.. lol. states 4 and 5 are pretty much unworked on atm.

if anyone could cast an eye on this and give me some pointers i would be mighty greatfull!!

when it gets too the 4th state just hit enter too make it loop again.. and the whole demo state thats causing me trouble is in ApophisState2.cpp.
« Last Edit: June 25, 2013 by ninogenio »
Challenge Trophies Won:

Offline Canopy

  • Atari ST
  • ***
  • Posts: 208
  • Karma: 20
    • View Profile
Re: a little stuck with glsl
« Reply #1 on: June 25, 2013 »

are you using any tools like gDEBugger?  they help a lot.

most of the problems i had when using with VBOs were down to not having the attributes/uniforms mapped correctly.

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1668
  • Karma: 133
    • View Profile
Re: a little stuck with glsl
« Reply #2 on: June 25, 2013 »
thanks mate,

i should have said that ive been using the vs debugger. setting breakpoints and checking values etc.. all my uniforms and attributes are being fetched properly i checked there values at runtime. but not sure if there being set properly not sure how too check that.

its a hard one too figuare out simply because it does work but just not as expected. where as if it was crashing it would be much easyer too fix.

-edit just had a little look at gdebbuger. looks perfect for the job ill have too look deeper k+!
« Last Edit: June 25, 2013 by ninogenio »
Challenge Trophies Won:

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1668
  • Karma: 133
    • View Profile
Re: a little stuck with glsl
« Reply #3 on: June 25, 2013 »
well i tracked down the problem tonight,

i was stupidly not using glm properly and the rendering was happening out of view lol.. i've attached a working ver excuse the cam going through the wall, there is no proper cam implemented atm.. thats next on my list :)

word of caution this doesnt work properly on my system while its in zip form for some reason. so might have too be extracted into a folder first..

« Last Edit: June 25, 2013 by ninogenio »
Challenge Trophies Won: