# No Fullscreen and Low FPS.

This topic is 3973 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Well, I have got a problem with the engine I'm building. I had fullscreen working, but all of a sudden. it doesnt work anymore I guess its since I put in the 3d models, lightning etc Not sure though.. And, my framerate is crappy, kinda like, 21.. while it supposed to be around 60~120.. If anyone wants to help me fix these bugs, Download source code here For safety of my source, and to be sure its for helping purpose only I put a password on my ZIP file.. If you are willing to help. PM me or post here, and I'll send you the password. Regards, Sven Petersen.

##### Share on other sites
Quote:
 Original post by djnevsWell, I have got a problem with my engine i'm building.I had fullscreen working, but all of a sudden. it doesnt work anymoreI guess its since i put in the 3d models, lightning etcNot sure though..And, my framerate is crappy,kinda like, 21.. while it supposed to be around 60~120..If anyone wants to help me fix these bugs,Download source code hereFor safety of my source, and to be sure its for helping purpose onlyI put a password on my ZIP file.. If you are willing to help. PM me or post here, and i'll send you the password.Regards,Sven Petersen.

I seriously doubt anyone is going to PM you, so they can download ALL of your source, to pin-point YOUR problem. (Not trying to be mean or anything, just pointing it out [wink].)

Instead, I suggest you try to find your problem yourself. Or at least narrow it down to something and ask us if that's good how you're doing it, if there are optimizations to be done, etc.

Anyways, see how you're handling your models and lighting. I'm not exactly some graphics guru, but I'm sure there are some fast ways of doing so and some slow ways of doing slow (and you may be using one really slow way). So others will reply and help you out with that.

Also, how is your graphics card? Maybe it's simply not fast enough?

##### Share on other sites

my graphics card isnt that good indeed
but my bro has nvidia 8600 gts
and there it still runs on 51 fsp..
THATS NOT GOOD lol.. :p

##### Share on other sites
Ok, ik think i got the problem with the framerate..

When i got only 1 object loaded.
framerate drops to 10~20fps..

source of the objects
using System;using System.Collections.Generic;using System.Text;using System.Windows.Forms;using Microsoft.DirectX;using Microsoft.DirectX.Direct3D;public class cObject{    private Mesh obj;        public void CreateBox(Device device, float x, float y, float z)    {        obj = Mesh.Box(device, x, y, z); // :-)    }    public void CreateSphere(Device device, float radius, int slices, int stacks)    {        obj = Mesh.Sphere(device, radius, slices, stacks);    }    public void OnPaint(Device device, float xpos, float ypos, float zpos)    {        device.Transform.World = Matrix.Identity * Matrix.RotationYawPitchRoll(0,0,0) * Matrix.Translation(xpos, ypos, zpos);        Material m = new Material();        m.Diffuse = m.Ambient = System.Drawing.Color.Red;        device.Material = m;        obj.ComputeNormals();        obj.DrawSubset(0);            }}

##### Share on other sites
Quote:
 Original post by djnevsOk, ik think i got the problem with the framerate..When i got only 1 object loaded.it works fine (about 200~500fps)when i add another objectframerate drops to 10~20fps..source of the objects*** Source Snippet Removed ***

It looks like you are computing the normals every frame? In that case the engine transport the mesh data from GPU-memory to CPU-memory, computes the normals and sending it back again every frame. That takes a lot of time. Try to compute the normals in a pre-process store them and maybe things would speed up.

##### Share on other sites
Thanks, that helped alot :)
framerate is normal now ^^

Only the fullscreen thing doesnt work

When i set fullscreen, it gives the following error

at this line:
this.Text = "Cross Engine (Developer Mode)";

kinda wierd.
why would it give such a error with that? O.o;;

##### Share on other sites
When you switch from windowed to fullscreen, you might find that the device goes into a lost state and with this any rendering that is called will fail.

Have you implemented a way to check for lost devices and handle them properly? If not, I suggest you read the following.

I hope this helps.
Take care.

• 18
• 11
• 17
• 9
• 51
• ### Forum Statistics

• Total Topics
631396
• Total Posts
2999791
×