XNA Game Development Forums
2012/05/18 07:06:13 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Search Calendar Login Register  
Pages: [1]
  Print  
Author Topic: Tutorial 3 help... new question i believe  (Read 3127 times)
hansonc
Newbie
*
Offline Offline

Posts: 9


View Profile
« on: 2007/03/26 12:52:18 »

I accidentally posted my original thread in the wrong forum... here is the link to that:

http://www.thehazymind.com/smf/index.php/topic,224.0.html

Altho as a gist of things... my laptop does not have shader capability at all, i am pretty sure, as it's a dell integrated card.

I just want to be able to continue on w/ my learning in this programming, hopefully by being able to put a checker in to see if the comp has shader, if so what version can it use and if none execute a work around. Is this posible?

Right now, i can't continue learning cuz my comp is a POS.. lol and no money to exactly go get a laptop of my own.
Logged
ericc59
Jr. Member
**
Offline Offline

Posts: 50


View Profile
« Reply #1 on: 2007/03/26 18:21:25 »

XNA requires shaders.
Logged
hansonc
Newbie
*
Offline Offline

Posts: 9


View Profile
« Reply #2 on: 2007/03/27 09:24:15 »

this post or the other post may be deleted...

So if my laptop is integrated and won't allow even ps_1_1 then im SOL? and basically have to get a new laptop?

EDIT::
Given if i can properly understand the info below, it sounds like i shouldn't be getting the error at all, as my integrated card allows for PS 2.0.

If that's the case could some one help me figure out why I might be getting that error? I honestly have followed every threads suggestion and researched this all over online.

Both a valid vertex shader and  pixel shader (or valid effect) must be set on the device before draw operations may be performed.


Intel? 915G / 915GM
Pixel Shader Model = 2.0
Shader Precision = 24 bit floating point
Max Sampler = 8
Max Shader Instructions = 96
Dependent Textures = 4
Dynamic Branching = N
Max Texture Instructions = 32

Compute Precision = 24 bits floating point
Max 2d texture = 2K x 2K
Max 3d texture = 2048 x 2048 x 256
Max cube map = 1024
Max Anisotropy = 4 sub-samples
Compressed textures = DXT1, DXT3, DXT5 and FXTn
Non power of 2 texture sizes = Yes
Render to texture = Yes

Compute Precision = 24 bit floating point
Max 2d texture = 2K x 2K
Max 3d texture = 128x128x128
Max cube map = 1024
Max Anisotropy = 4 sub-samples
Compressed textures = DXT1,DXT3,DXT5 and FXTn
Non power of 2 texture sizes = Yes
Render to texture = Yes

Vertex Texture = SW
Instancing = SW
Dynamic Flow = SW
Vertex Shader Model =3.0 in SW



« Last Edit: 2007/03/27 09:46:34 by hansonc » Logged
Nemo Krad
Global Moderator
Hero Member
*****
Offline Offline

Posts: 512


I have seen the fnords


View Profile WWW
« Reply #3 on: 2007/03/27 11:54:42 »

Set the vertex and pixel shaders to 1_0 in the fx file and switch the index types from int to shorts, this includes the cast (int) as well.

If that fails then I guess you can try setting your device to software mode rather than hardware, it will be much slower, but it may work..
Logged
hansonc
Newbie
*
Offline Offline

Posts: 9


View Profile
« Reply #4 on: 2007/03/27 13:25:24 »

Nemo,

 I appreciate your help... I don't know what an "index type" is and can't find any info on it in google, other than people using the phrase in context.  Also I don't have anything declared as an "int" in my code.  I am a newb at coding, and dont know much of the lingo at all... could you give an example so that can compare and edit.

I downloaded his code, changed it to 2.0... i don't recieve the error anymore, however no logo is presented in the middle of the screen either as described.

Given that I start all over and get it all to work and run like his actual source what would cause the graphic not to show?
« Last Edit: 2007/03/27 13:33:47 by hansonc » Logged
Nemo Krad
Global Moderator
Hero Member
*****
Offline Offline

Posts: 512


I have seen the fnords


View Profile WWW
« Reply #5 on: 2007/03/27 13:40:48 »

Sorry mate,

Right in your texturedQuad code you will have  a LoadGraphicsContent method, in this method the index's that are created in here are declared as int's (an integer), on my laptop I had to set these to shorts as my card had issues with rendering shaders too.

ALL my indexes are set up using shorts now, this is my LoadGraphicsContent of my TexturedQuad:
Code:
        public void LoadGraphicsContent(GraphicsDevice myDevice, ContentManager myLoader)
        {
            myTexture = myLoader.Load<Texture2D>(myAsset);

            VertexPositionTexture[] verts = {
                new VertexPositionTexture(new Vector3(-0.5f,0.5f,0),new Vector2(0,0)),
                new VertexPositionTexture(new Vector3(0.5f,0.5f,0),new Vector2(1,0)),
                new VertexPositionTexture(new Vector3(-0.5f,-0.5f,0),new Vector2(0,1)),
                new VertexPositionTexture(new Vector3(0.5f,-0.5f,0),new Vector2(1,1))               
            };

            // You will have int[] inds... here
            short[] inds = { 0, 1, 2, 1, 3, 2 };

            vDecl = new VertexDeclaration(myDevice, VertexPositionTexture.VertexElements);

            myVerticies = new VertexBuffer(myDevice, typeof(VertexPositionTexture), 4,
                                            ResourceUsage.WriteOnly, ResourceManagementMode.Automatic);

            myVerticies.SetData(verts, 0, 4, SetDataOptions.None);

            // Here; change the typeof(int) to typeof(short)
            myIndices = new IndexBuffer(myDevice, typeof(short), 6, ResourceUsage.WriteOnly,
                                            ResourceManagementMode.Automatic);

            myIndices.SetData(inds, 0, 6, SetDataOptions.None);
        }

int, long, float, short, char, string etc... are all data types, a good idea would be to get a simple C# book and this will give you a reference for this kind of stuff. It's all a bit bamboozling at first, but it all comes good in the end, and then you find something else to make your brain bleed  Tongue
Logged
hansonc
Newbie
*
Offline Offline

Posts: 9


View Profile
« Reply #6 on: 2007/03/27 14:54:21 »

blah!

No go, still dumps the same issue.

It's okay.  Just means it time to start all over again.  Could have been worse I could have been at Tutorial 11.

I built the whole engine wrong any how, as I had put a main() into the HMEngine and HMEngine is not a dll, ect..

Cheers Nemo! Your help was appreciated.
Logged
thoams
Newbie
*
Offline Offline

Posts: 11


View Profile
« Reply #7 on: 2007/04/30 11:02:14 »

I have been trying for ages to get my intel 915 integrated card to work.

It just doesn't wanna!

Full stop!

Only solution I found for working on my laptop was to VNCViewer to my PC, and do all my work remotely.

Heh.
Logged
Chr0n1x
Global Moderator
Sr. Member
*****
Offline Offline

Posts: 307


View Profile WWW
« Reply #8 on: 2007/04/30 15:17:37 »

As stated in the XNARacer sample, some Intel Integrated Graphics Chips incorretly report their Shader capabilities and so might/will not be able to work.
My friend has a 915 and he isnt able to run 2.0 games, much to his dismay, so I think thats the chipset that does it. You are going to need to do your development, or testing on your PC.
Also remember the 1.x series of shaders have now been deprecated(depreciated?) and won't compile in the latest versions of the SDK.
Logged

BackwardsBoxers
Newbie
*
Offline Offline

Posts: 2


View Profile
« Reply #9 on: 2007/05/15 01:32:01 »

Im having a problem with getting the shader to work as well...

My card is a geforce FX 5600 and should have pixel shading capabilities but I have no idea how to find out for sure. When the code runs I can look at the mydevice object and see various details about it. It gives a null for pixel and vertex shading which I suppose shows the problem. However it also shows 900 for the driver level, which implies its DX 9 compatible which I thought meant it had to support pixel and vertex shading?

Is it possible that XNA is somehow not loading my graphics card into the mydevice object properly? Would an update to my drivers maybe solve this?
Logged
Pages: [1]
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Question about Getting 2D screen coordinates General Discussion DaphydTheBard 6 2462 Last post 2007/02/27 03:23:36
by DaphydTheBard
Question: Texturing Terrain General Discussion Ashe 1 2337 Last post 2007/03/17 10:28:36
by DaphydTheBard
Question about getting rotation angles from Quaternions... General Discussion DaphydTheBard 7 3132 Last post 2007/03/20 07:27:20
by DaphydTheBard
Array Question General Discussion LucianX 11 3351 Last post 2007/04/13 04:51:19
by Nemo Krad
Tutorial 3 Hazy Mind XNA Engine hansonc 4 2480 Last post 2007/03/27 09:23:23
by hansonc
Question about loading textures General Discussion nicknz 2 1957 Last post 2007/04/23 05:36:17
by EclipsE
tutorial 3 sprite question Hazy Mind 3D Engine precious roy 2 2728 Last post 2009/10/18 08:53:11
by Wekbaite73
FPS question General Discussion XNASorcerer 2 1468 Last post 2007/04/28 15:23:19
by XNASorcerer
HMObject design question Hazy Mind XNA Engine jdowling 1 1266 Last post 2007/05/11 23:05:38
by Tiago
Thanks And A question Hazy Mind XNA Engine zachaller 3 1567 Last post 2007/06/19 03:36:22
by Nemo Krad
Tutorial 1 PDF Hazy Mind XNA Engine carnelknowledge 2 1928 Last post 2007/09/05 12:19:26
by carnelknowledge
Tutorial 2 Hazy Mind XNA Engine Classicwarrior 5 2687 Last post 2008/05/17 23:01:31
by Classicwarrior
tutorial 3... where's my quad? Hazy Mind XNA Engine kubatrt 10 3281 Last post 2008/05/20 05:15:38
by kubatrt
Tutorial 9 - Topic Vote Hazy Mind XNA Engine « 1 2 » mikeschuld 15 6267 Last post 2008/06/02 12:08:21
by mikeschuld
Question About Packing Maps into one file? General Discussion jaypaul 0 1560 Last post 2009/06/03 05:12:47
by jaypaul
Powered by MySQL Powered by PHP Powered by SMF 1.1.12 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.97 seconds with 19 queries.